import axios from '@/libs/api.request'


export const getDetail = (id) => {
  return axios.request({
    url: 'AppUser/getDetail',
    method: 'get',
    params: {uid:id}
  })
};

/**
 * 获取用户列表
 * @param params
 * @returns {never}
 */
export const getList = (params) => {
  return axios.request({
    url: 'AppUser/list',
    method: 'get',
    params: params
  })
};

/**
 * 修改用户状态
 * @param status
 * @param id
 * @returns {never}
 */
export const changeStatus = (status, id) => {
  return axios.request({
    url: 'AppUser/changeStatus',
    method: 'get',
    params: {
      status: status,
      id: id
    }
  })
};


/**
 * 编辑用户
 * @param data
 * @returns {wx.RequestTask | never}
 */
export const edit = (data) => {
  return axios.request({
    url: 'AppUser/edit',
    method: 'post',
    data
  })
};

